home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor1
/
skunk.doc
< prev
next >
Wrap
Text File
|
1995-03-31
|
10KB
|
204 lines
(Comp.sys.handhelds)
Item: 3823 by dougc at bert.cs.byu.edu
Author: [DOUG CANNON]
Subj: SKUNK! a great animated dice game for the HP48s!
Date: Sat Aug 10 1991
Description: SKUNK is a 2 dice game of part strategy, part luck.
This game was written entirely in RPL code
and is loaded with great graphics and animation.
SKUNK may be played with one player and HP as
the opponent, or with two human players.
About me: SKUNK was written by Douglas R. Cannon. I am currently
an electrical engineering student at Brigham Young
University in Provo, Utah. As I am now on summer
vacation, I have had time for such frivolity. Fall
semester begins on Sept 4th and my HP48 fun will
abruptly end.
Douglas R. Cannon
178 Wymount #4A
Provo, UT 84604
(801) 371-2632
dougc@bert.cs.byu.edu
----------------
A long time ago I learned the game of Skunk. I am unaware of the author
of the original idea for the game, I think it (the game) is ancient. I
first wrote this for the HP28s, but have not yet worked it to the point
of being posted. Instead, I have been spending my time re-writing it for
the HP48s. I finished the program today, August 7, 1991.
The game is simple. SKUNK will first give you an options menu:
1) HP as player #1
2) HP as player #2
3) Two players
Only two players can play at one time, and HP will be one of those players
if you so desire. Playing with two people gets boring fast, but the option
is available. Choose an option by pressing 1, 2, or 3. If you choose HP
to be one of the players, then you are given a Skill level menu:
1) Terribly easy
2) Average
3) Challenging
The strategies are as follows: The easy strategy will always roll the dice
5 times before passing. The average strategy will always roll the dice 3
times before passing. Surprisingly enough, this is a good strategy. (See
the RDME section below as to why I think so.) and, the Challenging strategy
would be less challenging if I told you what it is. If you can beat this
strategy 6 times out of 10 with a destination score of 200, then I
applaud you.
After choosing a strategy, or if you choose two human players, then you are
given a destination score menu:
1) 100 points
2) 200 points
3) 300 points
This is self-explanitory. Obviously, the winner is the one who gains or
passes this score.
At this point you begin play. Player #1 rolls first, and his options are
to Roll or Pass. By pressing the A key, the dice are rolled, and by pressing
the F key you may pass. Skunk is played with two dice. The object is to
roll as many times as you can without getting "Skunked". One is "Skunked"
when a one is rolled on either die. If no ones are rolled, then the sum of
the two dice is added to the pot. If you are "Skunked" then you lose your
turn and the pot goes to zero. If you choose to pass at some time, then the
current pot is added to your score. The pot then returns to zero, and the
play passes to the next player.
It is extremely disastrous to be "Double Skunked". This is, of course,
when a one is rolled on each die. At this point, the pot goes to zero, your
score goes to zero, and you lose your turn. This is most undesireable.
Now, it is only fair that everyone get the same amount of turns, so if
player #1 should reach or pass the destination score, then player #2 has one
more turn to pass the score of player #1. Thus, if both players reach the
destination score, the winner is the player with the highest score. You can
see the advantages to being player #2. If player #2 reaches the destination
score, and player #1 has not yet reached it, player #2 wins immeadiately.
If both players reach the destination score and are tied, then it will go
into overtime until one player is >= the destination and > the other player's
score.
This is all you should need to know to play the game! I hope everyone
enjoys
this game! I cannot compete with those who program the schip stuff, and have
not tried this method as of yet. My main goal of writing this game was to
create some software that has nice animation, is fun, and is written
completely
in RPL code.
---------------------
About the ABOUT:
You can run the program ABOUT to find out about the author ( that's me )
This software is distributed under the "I don't care ware" system and thus
you can give it to anybody, use any or all programs and shapes elsewhere,
and even change them if it pleases you. Just leave the ABOUT program intact,
and I don't care. Otherwise I do care even though I will never know.
RDME skunk1.0
Here is a list of all the programs and shapes for anyone who is interested.
Some of these programs (DNUM, NEWS, NANNY) may be useful in other
applications.
I have listed each program, its purpose, and the arguments it needs.
Programs in order of appearance:
--------------------------------
SKUNK Run This. It starts the game ( no arguments )
ABOUT Run This. About the Author ( no arguments )
SKMAIN The master control program 3: destination score
2: skill level (0 if 2 humans)
1: HP player # (3 if 2 humans)
NEWS prints final score menu 2: message (String)
1: coordinates
DNUM Display a number 2: number
1: coordinates
NANNY The international song of the child ( no arguments )
Roll Roll dice ( no arguments )
exit: 2: dice #1
1: dice #2
ERNUM Erase a 25 by 8 spot ( a number ) 1: 1, 2, or 3
TURN Allows a human a turn 2: score (size 2 array)
1: destination score
HPTURN Allows HP a turn ( knows 3 strategies ) 4: score (size 2
array)
3: HP player # (1-2)
2: skill level (1-3)
1: destination score
QUIT Do you REALLY want to quit? ( no arguments )
FANF The "FANFARE" Somebody has won! 4: destination score
3: skill level (0-3)
2: HP player # (1-3)
1: score (size 2 array)
SK Someone is SKUNKED! 3: die #1
2: die #2
1: destination score
DSK Someone is DOUBLE SKUNKED!! 1: destination score
MYTH Well, this really is a myth you know ( no arguments )
Shapes in order of apearance:
-----------------------------
BOARD GROB 131 64 The playing Board
SKSKP GROB 71 31 The big SKUNK shape
DICE A list of 6 GROBs The dots on the dice
WAVES A list of 10 GROBs The wave in the options menu
DOTS A list of 4 GROBs The moving dots in the skill menu
BALLS A list of 10 GROBs The bouncing balls in the destination
menu
DESTIN A list of 3 GROBs Shows 100, 200, or 300 destination scores
YOUWON A list of 13 GROBs This creates the YOU WON! graphic
HPWON A list of 13 GROBs This crete e HP WON! graphic
PLANT A list of 3 GROBs The plant
POT A list of 3 GROBs The pot
SHAPES A list of 7 GROBs Various shapes
--------------------------------------------------------------------------
Following is some interesting data I collected while trying to find
three suitable strategies for HP to use. I originally wrote a SKUNK
simulation on the HP to test various strategies and find the best one.
It was much to slow, ( It would take almost an hour to simulate 100 games
without the use of graphics ) so I wrote a version in Pascal. On a 386 it
could simulate 20,000 games in under 15 minutes.
Now, I am not a stats man, but I used this simulator as follows: I would
program a specific strategy, and play it against another. They would play
for 3000 or 5000 games, and whichever strategy won the highest percentage
of games was obviously better. If I played the two against each other again,
they would consistently produce the same percentages. ( As long as the
number of simulated games was high enough. 3000 seemed adequate. )
Strategy #1: Roll once
Strategy #2: Roll twice
Strategy #3: Roll three times ( Used as average skill level )
Strategy #4: Roll four times
Strategy #5: Roll five times ( Uses as terribly easy skill level )
#1: won 35.4% vs. #2: won 64.6% ( 3000 games )
#2: won 52.8% vs. #3: won 47.2% ( 3000 games )
#2: won 51.8% vs. #3: won 48.2% ( 20000 game re-match )
#2: won 60.3% vs. #4: won 39.7% ( 3000 games )
#2: won 68.5% vs. #5: won 31.5% ( 3000 games )
#3: won 66.3% vs. #5: won 33.6% ( 10000 games )
From this we can see that rolling twice always is the best strategy of
the five listed. Rolling 3 times always is not too bad, and I chose this
as the average strategy. It is above average when compared to these, but
only average when compared to better strategies.
Strategy #19: The Challenging strategy.
#5: won 22.1% vs. #19: won 77.9%
#3: won 37.1% vs. #19: won 62.9%
Not too bad, really.